<!-- templates/add_student.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加学生信息</title>
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-4">
        <h1 class="text-center mb-4">添加学生信息</h1>

        <!-- 表单开始 -->
        <form action="{{ url_for('add_student') }}" method="POST">
            <div class="mb-3">
                <label for="name" class="form-label">姓名:</label>
                <input type="text" name="name" class="form-control" required>
            </div>

            <div class="mb-3">
                <label for="age" class="form-label">年龄:</label>
                <input type="number" name="age" class="form-control" required>
            </div>

            <div class="mb-3">
                <label for="score" class="form-label">成绩:</label>
                <input type="number" name="score" class="form-control" step="0.01" required>
            </div>

            <div class="d-flex justify-content-between">
                <button type="submit" class="btn btn-primary">添加学生</button>
                <a href="{{ url_for('index') }}" class="btn btn-secondary">返回主页</a>
            </div>
        </form>
        <!-- 表单结束 -->
    </div>

    <!-- 引入 Bootstrap JS 和 Popper.js -->
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz4fnFO9gybC6H5x6ZP6ih9R4f4blKp8hp0X5U7p4xg9z8FsgkUs6a9P7j5" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js" integrity="sha384-cn7l7gDPdR1mX9arI2w0AC0w7fv4IXbK12wvL1o9q58DqGzR+Xm0U3dYKn" crossorigin="anonymous"></script>
</body>
</html>
